<?php

//配置文件-上传配置
return [
    'default' => 'img',
    'up_type' => [
        // 图片
        'img' => [
            'save_path' => '/uploads/{scene}/img/{year}/{mon}/{day}',
            'max_size' => 2048000,
            'ext' => 'jpg,png,bmp,jpeg,gif',
            'mimetype' => 'image/jpeg,image/png,image/bmp,image/gif',
        ],
        // 文件
        'file' => [
            'save_path' => '/uploads/{scene}/file/{year}/{mon}/{day}{hour}',
            'max_size' => 10240000,
            'ext' => implode(',', [
                'jpg',
                'jpeg',
                'png',
                'bmp',
                'gif',
                'xls',
                'xlsx',
                'zip',
                'rar',
                '7z',
                'txt',
            ]),
            'mimetype' => implode(',', [
                'image/jpeg',
                'image/png',
                'image/bmp',
                'image/gif',
                'application/vnd.ms-excel',
                'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
                'application/zip',
                'application/x-zip-compressed',
                'application/x-rar-compressed',
                'application/x-7z-compressed',
                'text/plain',
            ]),
        ],
        // 图片/文件 对外
        'out_file' => [
            'save_path' => '/uploads/{scene}/file/{year}/{mon}/{day}',
            'max_size' => 2048000,
            'ext' => implode(',', [
                'jpg',
                'jpeg',
                'png',
                'bmp',
                'gif',
                'xls',
                'xlsx',
                'pdf',
            ]),
            'mimetype' => implode(',', [
                'image/jpeg',
                'image/png',
                'image/bmp',
                'image/gif',
                'application/vnd.ms-excel',
                'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
                'application/pdf',
            ]),
        ],
    ],
];
